<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstVideoResampler: GStreamer Base Plugins 1.0 Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
<link rel="up" href="gstreamer-video.html" title="Video Library">
<link rel="prev" href="gst-plugins-base-libs-GstVideoChroma.html" title="GstVideoChromaResample">
<link rel="next" href="gst-plugins-base-libs-GstVideoScaler.html" title="GstVideoScaler">
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gst-plugins-base-libs-GstVideoResampler.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gstreamer-video.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gst-plugins-base-libs-GstVideoChroma.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-base-libs-GstVideoScaler.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gst-plugins-base-libs-GstVideoResampler"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-GstVideoResampler.top_of_page"></a>GstVideoResampler</span></h2>
<p>GstVideoResampler — Utility structure for resampler information</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-base-libs-GstVideoResampler.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#gst-video-resampler-clear" title="gst_video_resampler_clear ()">gst_video_resampler_clear</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#gst-video-resampler-init" title="gst_video_resampler_init ()">gst_video_resampler_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-GstVideoResampler.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResampler" title="struct GstVideoResampler">GstVideoResampler</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResamplerFlags" title="enum GstVideoResamplerFlags">GstVideoResamplerFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResamplerMethod" title="enum GstVideoResamplerMethod">GstVideoResamplerMethod</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GST-VIDEO-RESAMPLER-OPT-CUBIC-B:CAPS" title="GST_VIDEO_RESAMPLER_OPT_CUBIC_B">GST_VIDEO_RESAMPLER_OPT_CUBIC_B</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GST-VIDEO-RESAMPLER-OPT-CUBIC-C:CAPS" title="GST_VIDEO_RESAMPLER_OPT_CUBIC_C">GST_VIDEO_RESAMPLER_OPT_CUBIC_C</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GST-VIDEO-RESAMPLER-OPT-ENVELOPE:CAPS" title="GST_VIDEO_RESAMPLER_OPT_ENVELOPE">GST_VIDEO_RESAMPLER_OPT_ENVELOPE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GST-VIDEO-RESAMPLER-OPT-MAX-TAPS:CAPS" title="GST_VIDEO_RESAMPLER_OPT_MAX_TAPS">GST_VIDEO_RESAMPLER_OPT_MAX_TAPS</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GST-VIDEO-RESAMPLER-OPT-SHARPEN:CAPS" title="GST_VIDEO_RESAMPLER_OPT_SHARPEN">GST_VIDEO_RESAMPLER_OPT_SHARPEN</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GST-VIDEO-RESAMPLER-OPT-SHARPNESS:CAPS" title="GST_VIDEO_RESAMPLER_OPT_SHARPNESS">GST_VIDEO_RESAMPLER_OPT_SHARPNESS</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-GstVideoResampler.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/video/video.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-GstVideoResampler.description"></a><h2>Description</h2>
<p><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResampler" title="struct GstVideoResampler"><span class="type">GstVideoResampler</span></a> is a structure which holds the information
required to perform various kinds of resampling filtering.</p>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-GstVideoResampler.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-video-resampler-clear"></a><h3>gst_video_resampler_clear ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_video_resampler_clear (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResampler" title="struct GstVideoResampler"><span class="type">GstVideoResampler</span></a> *resampler</code></em>);</pre>
<p>Clear a previously initialized <a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResampler" title="struct GstVideoResampler"><span class="type">GstVideoResampler</span></a> <em class="parameter"><code>resampler</code></em>
.</p>
<div class="refsect3">
<a name="gst-video-resampler-clear.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>resampler</p></td>
<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResampler" title="struct GstVideoResampler"><span class="type">GstVideoResampler</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-video-resampler-init"></a><h3>gst_video_resampler_init ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_video_resampler_init (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResampler" title="struct GstVideoResampler"><span class="type">GstVideoResampler</span></a> *resampler</code></em>,
                          <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResamplerMethod" title="enum GstVideoResamplerMethod"><span class="type">GstVideoResamplerMethod</span></a> method</code></em>,
                          <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GstVideoResamplerFlags" title="enum GstVideoResamplerFlags"><span class="type">GstVideoResamplerFlags</span></a> flags</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_phases</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_taps</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> shift</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> in_size</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> out_size</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="type">GstStructure</span></a> *options</code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-GstVideoResampler.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstVideoResampler"></a><h3>struct GstVideoResampler</h3>
<pre class="programlisting">struct GstVideoResampler {
  gint in_size;
  gint out_size;
  guint max_taps;
  guint n_phases;
  guint32 *offset;
  guint32 *phase;
  guint32 *n_taps;
  gdouble *taps;
};
</pre>
<p>A structure holding resampler information.</p>
<div class="refsect3">
<a name="GstVideoResampler.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoResampler.in-size"></a>in_size</code></em>;</p></td>
<td class="struct_member_description"><p>the input size</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoResampler.out-size"></a>out_size</code></em>;</p></td>
<td class="struct_member_description"><p>the output size</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstVideoResampler.max-taps"></a>max_taps</code></em>;</p></td>
<td class="struct_member_description"><p>the maximum number of taps</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstVideoResampler.n-phases"></a>n_phases</code></em>;</p></td>
<td class="struct_member_description"><p>the number of phases</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *<em class="structfield"><code><a name="GstVideoResampler.offset"></a>offset</code></em>;</p></td>
<td class="struct_member_description"><p>array with the source offset for each output element</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *<em class="structfield"><code><a name="GstVideoResampler.phase"></a>phase</code></em>;</p></td>
<td class="struct_member_description"><p>array with the phase to use for each output element</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *<em class="structfield"><code><a name="GstVideoResampler.n-taps"></a>n_taps</code></em>;</p></td>
<td class="struct_member_description"><p>array with new number of taps for each phase</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *<em class="structfield"><code><a name="GstVideoResampler.taps"></a>taps</code></em>;</p></td>
<td class="struct_member_description"><p>the taps for all phases</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoResamplerFlags"></a><h3>enum GstVideoResamplerFlags</h3>
<p>Different resampler flags.</p>
<div class="refsect3">
<a name="GstVideoResamplerFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-VIDEO-RESAMPLER-FLAG-NONE:CAPS"></a>GST_VIDEO_RESAMPLER_FLAG_NONE</p></td>
<td class="enum_member_description">
<p>no flags</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-VIDEO-RESAMPLER-FLAG-HALF-TAPS:CAPS"></a>GST_VIDEO_RESAMPLER_FLAG_HALF_TAPS</p></td>
<td class="enum_member_description">
<p>when no taps are given, half the
             number of calculated taps. This can be used when making scalers
             for the different fields of an interlaced picture. Since: 1.10</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GstVideoResamplerMethod"></a><h3>enum GstVideoResamplerMethod</h3>
<p>Different subsampling and upsampling methods</p>
<div class="refsect3">
<a name="GstVideoResamplerMethod.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-VIDEO-RESAMPLER-METHOD-NEAREST:CAPS"></a>GST_VIDEO_RESAMPLER_METHOD_NEAREST</p></td>
<td class="enum_member_description">
<p>Duplicates the samples when
   upsampling and drops when downsampling</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-VIDEO-RESAMPLER-METHOD-LINEAR:CAPS"></a>GST_VIDEO_RESAMPLER_METHOD_LINEAR</p></td>
<td class="enum_member_description">
<p>Uses linear interpolation to reconstruct
   missing samples and averaging to downsample</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-VIDEO-RESAMPLER-METHOD-CUBIC:CAPS"></a>GST_VIDEO_RESAMPLER_METHOD_CUBIC</p></td>
<td class="enum_member_description">
<p>Uses cubic interpolation</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-VIDEO-RESAMPLER-METHOD-SINC:CAPS"></a>GST_VIDEO_RESAMPLER_METHOD_SINC</p></td>
<td class="enum_member_description">
<p>Uses sinc interpolation</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-VIDEO-RESAMPLER-METHOD-LANCZOS:CAPS"></a>GST_VIDEO_RESAMPLER_METHOD_LANCZOS</p></td>
<td class="enum_member_description">
<p>Uses lanczos interpolation</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GST-VIDEO-RESAMPLER-OPT-CUBIC-B:CAPS"></a><h3>GST_VIDEO_RESAMPLER_OPT_CUBIC_B</h3>
<pre class="programlisting">#define GST_VIDEO_RESAMPLER_OPT_CUBIC_B      "GstVideoResampler.cubic-b"
</pre>
<p>G_TYPE_DOUBLE, B parameter of the cubic filter. The B
parameter controls the bluriness. Values between 0.0 and
2.0 are accepted. 1/3 is the default.</p>
<p>Below are some values of popular filters:
                   B       C
Hermite           0.0     0.0
Spline            1.0     0.0
Catmull-Rom       0.0     1/2
Mitchell          1/3     1/3
Robidoux          0.3782  0.3109
Robidoux
 Sharp            0.2620  0.3690
Robidoux
 Soft             0.6796  0.1602</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-VIDEO-RESAMPLER-OPT-CUBIC-C:CAPS"></a><h3>GST_VIDEO_RESAMPLER_OPT_CUBIC_C</h3>
<pre class="programlisting">#define GST_VIDEO_RESAMPLER_OPT_CUBIC_C      "GstVideoResampler.cubic-c"
</pre>
<p>G_TYPE_DOUBLE, C parameter of the cubic filter. The C
parameter controls the Keys alpha value. Values between 0.0 and
2.0 are accepted. 1/3 is the default.</p>
<p>See <a class="link" href="gst-plugins-base-libs-GstVideoResampler.html#GST-VIDEO-RESAMPLER-OPT-CUBIC-B:CAPS" title="GST_VIDEO_RESAMPLER_OPT_CUBIC_B"><span class="type">GST_VIDEO_RESAMPLER_OPT_CUBIC_B</span></a> for some more common values</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-VIDEO-RESAMPLER-OPT-ENVELOPE:CAPS"></a><h3>GST_VIDEO_RESAMPLER_OPT_ENVELOPE</h3>
<pre class="programlisting">#define GST_VIDEO_RESAMPLER_OPT_ENVELOPE      "GstVideoResampler.envelope"
</pre>
<p>G_TYPE_DOUBLE, specifies the size of filter envelope for
<em class="parameter"><code>GST_VIDEO_RESAMPLER_METHOD_LANCZOS</code></em>
. values are clamped between
1.0 and 5.0. 2.0 is the default.</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-VIDEO-RESAMPLER-OPT-MAX-TAPS:CAPS"></a><h3>GST_VIDEO_RESAMPLER_OPT_MAX_TAPS</h3>
<pre class="programlisting">#define GST_VIDEO_RESAMPLER_OPT_MAX_TAPS     "GstVideoResampler.max-taps"
</pre>
<p>G_TYPE_INT, limits the maximum number of taps to use.
16 is the default.</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-VIDEO-RESAMPLER-OPT-SHARPEN:CAPS"></a><h3>GST_VIDEO_RESAMPLER_OPT_SHARPEN</h3>
<pre class="programlisting">#define GST_VIDEO_RESAMPLER_OPT_SHARPEN      "GstVideoResampler.sharpen"
</pre>
<p>G_TYPE_DOUBLE, specifies sharpening of the filter for
<em class="parameter"><code>GST_VIDEO_RESAMPLER_METHOD_LANCZOS</code></em>
. values are clamped between
0.0 and 1.0. 0.0 is the default.</p>
</div>
<hr>
<div class="refsect2">
<a name="GST-VIDEO-RESAMPLER-OPT-SHARPNESS:CAPS"></a><h3>GST_VIDEO_RESAMPLER_OPT_SHARPNESS</h3>
<pre class="programlisting">#define GST_VIDEO_RESAMPLER_OPT_SHARPNESS     "GstVideoResampler.sharpness"
</pre>
<p>G_TYPE_DOUBLE, specifies sharpness of the filter for
<em class="parameter"><code>GST_VIDEO_RESAMPLER_METHOD_LANCZOS</code></em>
. values are clamped between
0.5 and 1.5. 1.0 is the default.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>